package com.kelvem.saas.workbanch.fsm.core;

import com.kelvem.saas.workbanch.fsm.entity.Entity;

/**
 * @author kelvem
 */
public class FsmException extends RuntimeException {
    public FsmException(String msg ) {
        super( msg );
    }
    
    public FsmException(Class<? extends Entity> entityClazz, String eventCode, String msg) {
        super( "Event[" + entityClazz.getSimpleName() + "-" + eventCode + "] " + msg );
    }
    
    public FsmException(String entityName, String eventCode, String msg) {
        super( "Event[" + entityName + "-" + eventCode + "] " + msg );
    }
    
    public FsmException(String msg, Throwable ex ) {
        super( msg, ex );
        // todo 从 FsmContext获取event信息
    }
}
